<template>
  <div class="app-container">
    <u-page title="导购统计">
      <u-filtered>

        <el-form :inline="true" :model="listQuery" class="search-form">
          <el-form-item label="年月">
            <el-date-picker
              v-model="listQuery.yearMonth"
              type="month"
              placeholder="年月"
              value-format="yyyyMM"
              clearable
            />
          </el-form-item>
          <el-form-item label="部门" prop="dept">
            <el-input v-model="listQuery.dept" placeholder="关键词搜索" clearable />
          </el-form-item>
          <el-form-item>
            <el-button type="primary" icon="el-icon-search" @click="hdlFilter">搜索</el-button>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" icon="el-icon-download" @click="hdlExport">导出</el-button>
          </el-form-item>
        </el-form>

      </u-filtered>

      <u-table
        :data="list"
        :loading="listLoading"
        :options="listOptions"
        :columns="columns"
        :pagination.sync="listQuery"
        :fetch="hdlList"
      />

    </u-page>

  </div>
</template>
<script>

export default {
  data: function() {
    return {
      api: this.$u.api.PluginsGuideStatistics,
      // 表格
      columns: [
        {
          prop: 'yearMonth',
          label: '年月',
        },
        {
          prop: 'dept',
          label: '部门',
        },
        {
          prop: 'merchantCount',
          label: '商户数',
        },
        {
          prop: 'employeeCount',
          label: '在职人数',
        },
        {
          prop: 'monthlyLockedCount',
          label: '本月锁定人数',
        },
        {
          prop: 'monthlyExpiredCount',
          label: '本月锁定(证件到期锁定)人数',
        },
        {
          prop: 'monthlyInactiveCount',
          label: '本月锁定(7天未登录)人数',
        },
        {
          prop: 'monthlyResignedCount',
          label: '本月离职人数',
        },
        {
          prop: 'morningReportRequiredCount',
          label: '早报应发次数',
        },
        {
          prop: 'morningReportActualCount',
          label: '早报实发次数',
        },
        {
          prop: 'morningReportRate',
          label: '早报占比%',
        },
        {
          prop: 'morningReportReadRequiredCount',
          label: '早报阅读应读次数',
        },
        {
          prop: 'morningReportReadActualCount',
          label: '早报阅读实读次数',
        },
        {
          prop: 'morningReportReadRate',
          label: '早报阅读占比%',
        },
        {
          prop: 'scheduleRequiredCount',
          label: '班表应上传人数',
        },
        {
          prop: 'scheduleActualCount',
          label: '班表实际上传人数',
        },
        {
          prop: 'scheduleRate',
          label: '班表上传人数占比%',
        },
        {
          prop: 'reconciliationRequiredCount',
          label: '对账应读次数',
        },
        {
          prop: 'reconciliationActualCount',
          label: '对账实际次数',
        },
        {
          prop: 'reconciliationRate',
          label: '对账占比%',
        },
      ],

      list: [],
      listLoading: true,
      listOptions: {
        stripe: true // boolean 斑马纹
      },
      listQuery: {
        pageNumber: 1,
        pageSize: 20,
        totalCount: 1,
        yearMonth: '',
        dept: '',
      },
      dialogFormVisible: false,
      dataForm: {}

    }
  },
  created() {
    this.hdlList()
  },
  methods: {
  }
}
</script>

